Telegram Group & Telegram Channel
Совет по Laravel 💡

Вот 3 синтаксических способа определения внешнего ключа отношения belongsTo в миграциях.
Лично я считаю второй вариант более предпочтительным.

Schema:: create( 'orders', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger( 'user_id');
$table->foreign('user_id')->references( id') ->on('users");
});
// Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained();
});
/Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignIdFor (User: :class) ->constrained( ) ;
/
});

👉 @php_lib
👍4



tg-me.com/php_lib/499
Create:
Last Update:

Совет по Laravel 💡

Вот 3 синтаксических способа определения внешнего ключа отношения belongsTo в миграциях.
Лично я считаю второй вариант более предпочтительным.

Schema:: create( 'orders', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger( 'user_id');
$table->foreign('user_id')->references( id') ->on('users");
});
// Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained();
});
/Or
Schema: :create( 'orders', function (Blueprint $table) {
$table->id();
$table->foreignIdFor (User: :class) ->constrained( ) ;
/
});

👉 @php_lib

BY Библиотека PHP программиста 👨🏼‍💻👩‍💻




Share with your friend now:
tg-me.com/php_lib/499

View MORE
Open in Telegram


Библиотека PHP программиста ‍‍ Telegram | DID YOU KNOW?

Date: |

For some time, Mr. Durov and a few dozen staffers had no fixed headquarters, but rather traveled the world, setting up shop in one city after another, he told the Journal in 2016. The company now has its operational base in Dubai, though it says it doesn’t keep servers there.Mr. Durov maintains a yearslong friendship from his VK days with actor and tech investor Jared Leto, with whom he shares an ascetic lifestyle that eschews meat and alcohol.

Find Channels On Telegram?

Telegram is an aspiring new messaging app that’s taking the world by storm. The app is free, fast, and claims to be one of the safest messengers around. It allows people to connect easily, without any boundaries.You can use channels on Telegram, which are similar to Facebook pages. If you’re wondering how to find channels on Telegram, you’re in the right place. Keep reading and you’ll find out how. Also, you’ll learn more about channels, creating channels yourself, and the difference between private and public Telegram channels.

Библиотека PHP программиста ‍‍ from in


Telegram Библиотека PHP программиста 👨🏼‍💻👩‍💻
FROM USA